<template>
	<view style="padding: 30rpx;">
		<view class="news-info-view">
			<view class="font-30 mb-2">{{detail.title}}</view>
			<view class="mb-2" style="font-size: 13px; color: #999999;">{{detail.createtime}}</view>
			<u-parse :content="detail.content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				id:'',
				detail:{}
			}
		},
		onLoad(option) {
			console.log(option)
			this.id = option.id
			this.getNewsContent(this.id)
		},
		methods:{
			getNewsContent(id){
				this.$api.getNewsContent({id:id}).then(res=>{
					console.log(res)
					this.detail = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.news-info-view{
		padding: 30rpx;
		background-color: #ffffff;
		border-radius: 20rpx;
	}
</style>